package com.ng.sys.model.mapping;

import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import com.ng.sys.model.domain.*;

public class _MappingKit {

	public static void mapping(ActiveRecordPlugin arp) {

		arp.addMapping(Dept.TABLE_NAME, "id", Dept.class);
		arp.addMapping(Dict.TABLE_NAME, "id", Dict.class);
		arp.addMapping(DictItem.TABLE_NAME, "id", DictItem.class);
		arp.addMapping(Menu.TABLE_NAME, "id", Menu.class);
		arp.addMapping(Role.TABLE_NAME, "id", Role.class);
		// Composite Primary Key order: role_id,menu_id
		arp.addMapping(RoleMenu.TABLE_NAME, "role_id,menu_id", RoleMenu.class);
		arp.addMapping(User.TABLE_NAME, "id", User.class);
		arp.addMapping(UserLog.TABLE_NAME, "id", UserLog.class);
		// Composite Primary Key order: user_id,role_id
		arp.addMapping(UserRole.TABLE_NAME, "user_id,role_id", UserRole.class);

	}
}
